﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JiuQianTS.aspx.cs" Inherits="Web.Pages.QuShui.DiXiaS.ShouFeiGL.JiuQianTS"  Theme="Default"%>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/jquery.js"></script>
    <script src="../../../../JS/AddEditCancel.js"></script>
    <script type="text/javascript">


        function rowClick() {
            if (gvGridTab1.GetFocusedRowIndex() != -1) {
                if (gvGridTab1.GetFocusedRowIndex() != -1) {
                    hdCollection.Set("S_BIANHAO", gvGridTab1.GetRowKey(gvGridTab1.GetFocusedRowIndex()));
                    gvGridTab2.PerformCallback();
                }
            }
        }

        function reLoad() {
            //alert(1);
            gvGridTab1.PerformCallback();
        }


        function openDia1() {
            openCenter("/Pages/QuShui/DiXiaS/5.ShouFeiGL/JiuQianTS_ZJ.aspx?type=1", "880px", "540px");
        }

        function openDia2() {
            openCenter("/Pages/QuShui/DiXiaS/5.ShouFeiGL/JiuQianTS_ZJ.aspx?type=1", "880px", "540px");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            生成旧欠托收
        </div>
         <div style="display: none;">
            <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
           </div>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    
                    <hr />
                    <div style="width: 100%;">

                        <div style="width: 80%;">
                            <fieldset style="border: 1px solid #a3c0e8;">
                                <legend>进账单列表</legend>
                                 <dx:ASPxButton ID="btnSCXJZD" runat="server" Text="生成新的进账单"  UseSubmitBehavior="false">   
                                     <ClientSideEvents Click="function(s,e){openDia1();}"/>                                   
                                  </dx:ASPxButton> 
                               <dx:ASPxGridView ID="gvGridTab1" ClientInstanceName="gvGridTab1" runat="server" AutoGenerateColumns="False" KeyFieldName="I_BIANHAO" 
                                        ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%"   EnableCallBacks="true" SettingsBehavior-AllowSort="true"
                                   OnCustomCallback="gvGridTab1_CustomCallback">
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="S_WENJIANM" Caption="文件名" Width="18%">
                                            </dx:GridViewDataTextColumn>
                                             <dx:GridViewDataTextColumn FieldName="I_ZONGBIS" Caption="总笔数" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="N_ZONGJINE" Caption="总金额" Width="20%" PropertiesTextEdit-DisplayFormatString="0.00">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="D_SHANGCHUANRQ" Caption="进账单生成日期" Width="20%"  PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd">
                                            </dx:GridViewDataTextColumn>
                                           <%-- <dx:GridViewDataTextColumn FieldName="LX" Caption="送盘类型" Width="15%">
                                            </dx:GridViewDataTextColumn>--%>
                                             <dx:GridViewDataTextColumn FieldName="I_Y" Caption="托收年" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_M" Caption="托收月" Width="10%">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollBarMode="Visible"  HorizontalScrollBarMode="Auto" VerticalScrollableHeight="200" />
                                        <SettingsPager   Mode="EndlessPaging" PageSize="100"  />
                                        <Settings ShowFooter="True" />
                                        <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
                                        <ClientSideEvents FocusedRowChanged="function(s,e){rowClick();}" />
                                        <SettingsBehavior ProcessFocusedRowChangedOnServer="false" />
                                        <%--<ClientSideEvents Init="function(s,e){AdjustSize(450,gvGridTab1);}"  />--%>
                                    </dx:ASPxGridView>
                            </fieldset>
                        </div>
                        <div>
                            <fieldset style="border: 1px solid #a3c0e8;">
                                <legend>托收明细列表</legend>
                                <%-- <dx:ASPxButton ID="btnSCMX" runat="server" Text="添加旧欠托收明细" >
                                     <ClientSideEvents Click="function(s,e){openDia2();}"/>
                                </dx:ASPxButton> --%>
                                 <dx:ASPxGridView ID="gvGridTab2" ClientInstanceName="gvGridTab2" runat="server" AutoGenerateColumns="False" KeyFieldName="S_YONGHUH"  SettingsBehavior-AllowSort="true"
                                        ClientIDMode="AutoID" Settings-ShowVerticalScrollBar="true" Width="100%"   EnableCallBacks="true" OnCustomCallback="gvGridTab2_CustomCallback">
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="8%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="20%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="I_YM" Caption="年月" Width="7%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_SHIYONGL" Caption="水量" Width="5%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="N_JINE" Caption="金额" Width="8%" PropertiesTextEdit-DisplayFormatString="0.00">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_HUMING" Caption="银行户名" Width="20%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_ZHANGHAO" Caption="银行帐号" Width="17%">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="S_YINHANG" Caption="开户银行" Width="20%">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <Settings VerticalScrollBarMode="Visible"  HorizontalScrollBarMode="Auto" VerticalScrollableHeight="200"/>
                                        <SettingsPager   Mode="EndlessPaging" PageSize="100"  />
                                        <Settings ShowFooter="True" />
                                        <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
                                        <SettingsBehavior ProcessFocusedRowChangedOnServer="false" />
                                    </dx:ASPxGridView>
                            </fieldset>
                        </div>
                        
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <%--<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="生成文件" />--%>
    </form>
    
</body>
</html>
